import styled from "styled-components";
import _ from "lodash";
import React, { useRef, useState, useEffect } from "react";
import { SwapRightOutlined } from "@ant-design/icons";
import { DatePicker, Input, InputNumber, Menu, Modal, Button, Dropdown, Descriptions, Select, Space, Table, message, Tabs, Popconfirm, Checkbox, Card, Form } from "antd";

function DCard({ className, icon, title, extra, children }) {
	if (!className) {
		className = "wecard";
	}
	return (
		<div className={"dcard " + className}>
			{title ? (
				<div className="dcard-title">
					{icon}
					<span className="dcard-title-txt">{title}</span>
					<span className="extra">{extra}</span>
				</div>
			) : (
				""
			)}
			<div className="dcard-body">{children}</div>
		</div>
	);
}

export default DCard;
